1. Field of the Invention
The present invention relates to a real-time operating system that is suitable for a multimedia system which is capable of executing a plurality of tasks continuously and in real time, so as to handle a variety of data, and to a task management method therefor, and also to a computer which executes tasks in accordance with the above-noted real-time operating system and to a storage medium into which is stored the above-noted real-time operating system.
2. Description of Related Art.
Heretofore, a real-time operating system which can execute a plurality of tasks simultaneously in real time, has been used in many technical fields including controlling systems, computers or the like. And recently, there is a trend in that requirements for this kind of operating system have been increased. Further, on the other hand, it has been required that this kind of real-time operating system should be matched to so called multi-media systems in which various data should be handled.
In such a multimedia system, the data that is handled can be such data as voice data, image data and the like, and the programs that handle each type of data often have differing sampling frequencies, frame sizes, and number of execution cycles. For this reason, in an operating system of the past which performs overall management, as tasks, of these programs that handle the various types of data, it is required to assign these tasks to a CPU with good efficiency.
Additionally, in a real-time operating system such as has been used in the past, because there were no absolute limitations with regard to the execution times of each of the various tasks, the performance demanded from such a real-time operating system was not absolute. However, when applying such a real-time operating system in which there is no absolute limit with regard to execution time to a multimedia system such as noted above, there is the problem of not being able to perform high-speed execution of tasks which have differing execution times and also which have time limitations.
In the Japanese Unexamined Patent Publication No. H1-181130 (hereinafter referred to as the reference), there is a disclosure, as a method of starting a task of a real-time operating system, of the storage of the periodic starting interval for each task and each task name into a system management table beforehand, and the judging of the starting method for a stored task, as well as the starting of each task at the stored periodic interval therefor.
However, in the task starting method of the reference, because there is the need to access the real-time operating system each time the task is switched, it is not possible to perform quick task switching, thus causing an unavoidable drawback of not being able to meet the need for increased speed.
More specifically, when switching is done from one task to another task, a task switch in the real-time operating system is used, which is accompanied by an unavoidable operational overhead. Therefore, in the case in which a number of tasks having large time limitations are to be periodically executed, the amount of time occupied by the real-time operating system becomes large, so that there is the problem of each task not being completed by the time in which it is to be executed. Also, if switching by the task switch is performed frequently, the amount of time required for task monitoring becomes large, thus reducing the amount of time allocated for execution of each task.
In view of the above-described drawbacks in the prior art, an object of the present invention is to provide a real-time operating system that can be applied to a multimedia system.
Another object of the present invention is to provide a real-time operating system that can perform quick switching between a plurality of tasks.
Yet another object of the present invention is to provide a real-time operating system that can perform processing of tasks, without excesses or deficiencies, even when the tasks have differing execution times, frame sizes, and sampling frequencies.
Still another object of the present invention is to provide a computer which is operated by the above-noted real-time operating system and a storage medium into which is stored the above-noted real-time operating system.
According to one embodiment of the present invention, in a real-time operating system which is capable of executing a plurality of tasks by switching a task switch, this plurality of tasks, based on a pre-established criterion is classified into groups as task blocks. When switching between tasks which belong to one and the same task block, switching is done directly within that task block, without the intervention of the above-noted task switch. The above-noted task switch only performs switching when switching is done between tasks that do not belong to one and the same task block.
According to another embodiment of the present invention, a real-time operating system is provided wherein a scheduler for the purpose of selecting a task from within the above-noted task block is provided for each task block and the above-noted pre-established criterion is established by the deadline time for processing, that is, the frame size and sampling frequency, of each task, this being used to establish whether or not tasks are to be made part of the same block with other tasks.
In addition, according to yet another embodiment of the present invention, a computer is provided which includes the above-noted real-time operating system, and a storage medium is provided in which the above-noted real-time time operating system is stored.
According to yet another embodiment of the present invention, a task management method is provided which is used by a real-time operating system that is capable of executing a plurality of tasks sequentially in real time, wherein according to a pre-established criterion the above-noted plurality of tasks is classified into groups as task blocks, and whereby access to the task switch of the real-time operating system is managed in units of these task blocks.